{% extends ../../base/parent.html%}
{% block header %}
<title>权限组管理</title>
<meta name="keywords" content="">
<meta name="description" content="">
{% end %}
{% block nav %}
<nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
    首页
    <span class="c-gray en">/</span>
    管理员管理
    <span class="c-gray en">/</span>
    权限组管理
    <span class="c-gray en">/</span>
    组列表
</nav>
{% end %}
{% block body %}
<article class="Hui-admin-content clearfix">
    <div class="panel">
        <div class="panel-body">
            <div class="clearfix">
                <span class="f-l">
                    <a class="btn btn-primary radius" href="javascript:void(0);"
                       onclick="admin_role_add('添加权限组','/passport/permissions/group/add')"><i
                            class="Hui-iconfont">&#xe600;</i> 添加权限组</a>
                </span>
                <span class="f-r">共有数据：<strong>{{count}}</strong> 条</span>
            </div>
            <div class="mt-20 clearfix">
                <table class="table table-border table-bordered table-hover table-bg">
                    <thead>
                    <tr>
                        <th scope="col" colspan="6">权限组</th>
                    </tr>
                    <tr class="text-c">
                        <th width="40">ID</th>
                        <th width="100">组名</th>
                        <th class="text-l">描述</th>
                        <th width="85">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% if data %}
                    {% for i in data %}
                    <tr class="text-c">
                        <td>{{ i.id }}</td>
                        <td>{{ i.name }}</td>

                        <td class="text-l">{{ i.description }}</td>
                        <td class="f-14">
                            <a title="编辑权限组" class="btn btn-primary"
                               onclick="admin_role_edit('编辑组','/passport/permissions/group/edit/{{i.id}}')"
                               style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                            <a title="加权限到组"
                               onclick="admin_role_edit('加权限到组','/passport/permissions/add/{{i.id}}')"
                               class="btn btn-success"
                               style="text-decoration:none"><i class="Hui-iconfont">&#xe604;</i></a>
                        </td>
                    </tr>
                    {% end %}
                    {% else %}
                    <tr>没有数据</tr>
                    {% end %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</article>
{% end %}
{% block javascript %}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/libs/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/libs/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/static/plugins/hui/business/js/main.js"></script>
<!--/请在上方写此页面业务相关的脚本-->
{% block js %}
<script type="text/javascript">
    $(document).ready(function () {
        $("#menu-admin dd").css("display", "block");
        $("#menu-admin #permission-group").addClass("current");
    });
</script>
{% end %}
{% end %}
